﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Snake_Classic
{
    public partial class Help : Form
    {
        public Help()
        {
            InitializeComponent();
        }

        private void Help_Load(object sender, EventArgs e)
        {
            //path to file for filling richtextbox 
            string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string Filepath = Path.Combine(directory, "help.rtf");
            //load text to richtextbox from file
            richTextBox1.Text = File.ReadAllText(Filepath);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
            MenuForm menu = new MenuForm();
            menu.Show();
        }
    }
}
